import Model from '../index'

class Message extends Model {

  // 获取信息列表
  getMessageList (options) {
    options.url = '/api/fontend/message/getMessageList'
    return this.post(options)
  }

  // 标记已读
  updateMessageHaveRead (options) {
    options.url = '/api/fontend/message/updateMessageHaveRead'
    return this.post(options)
  }

  // 是否有消息
  isOrNoMessage (options) {
    options.url = '/api/fontend/message/isOrNoMessage'
    return this.post(options)
  }

  // 添加消息
  addMessage (options) {
    options.url = '/api/fontend/message/addMessage'
    return this.post(options)
  }
}

const messageModel = new Message()
export default messageModel
